package com.zxlspace.java8;

public enum Color {
    RED(1, "红色"),
    GREEN(2, "绿色"),
    YELLOW(3, "黄色");

    private Integer code;

    private String desc;

    Color(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
